<template>
  <div>
    <div class="BD">
      <p>
        <el-button round icon="el-icon-back" @click="back_page"></el-button>
      </p>
      <el-row>
        <el-col :span="18">
          <el-col :span="6">
            <span style="margin-left: 20px">事件编号：</span>
            <span>{{ eventno }}</span>
          </el-col>
          <el-col :span="6">
            <span>上报时间：</span>
            <span>
              <span v-if="baseUrl.ord2 == '县医院'">{{
                sendObj.reporttime | time
              }}</span>
              <el-date-picker
                v-else
                size="small"
                v-model="sendObj.reporttime"
                type="datetime"
                value-format="yyyy-MM-dd HH:mm:ss"
                placeholder="选择日期时间"
              >
              </el-date-picker>
            </span>
          </el-col>
          <el-col :span="6">
            <span>上报卡状态：</span>
            <span>正常</span>
          </el-col>
        </el-col>
        <el-col :span="6" v-if="!isShow">
          <el-button v-print="printObj">打印</el-button>
          <div>
            <el-button
              v-print="printObj2"
              size="small"
              type="primary"
              @click="ygt_click"
              >鱼骨图打印</el-button
            >
            <el-select
              v-model="isPrint_ygt"
              @change="ygt_change"
              multiple
              placeholder="请选择打印鱼骨图"
              size="small"
            >
              <el-option
                v-for="item in isYGT_names"
                :key="item"
                :label="item"
                :value="item"
              >
              </el-option>
            </el-select>
          </div>
        </el-col>
        <el-col :span="6" v-if="isShow">
          <!-- <el-button type="primary" size="mini">暂存（不验证）</el-button> -->
          <!-- <el-button v-print="printObj" size="small" type="primary"
            >打印</el-button
          > -->
          <el-button @click="to_print" size="small" type="primary"
            >打印</el-button
          >
          <el-button @click="submit2" size="small">暂存</el-button>
          <el-dropdown
            split-button
            type="primary"
            size="small"
            style="margin-left: 10px"
            @command="submit"
            v-if="isInfo.status == 0 || isInfo.status == 1"
            v-loading="isbtnLoading"
          >
            提交
            <el-dropdown-menu slot="dropdown" :disabled="isbtn_no">
              <el-dropdown-item
                v-for="item in this.submitObj"
                :key="item.id"
                :command="item.id"
                >{{ item.linkname }}</el-dropdown-item
              >
            </el-dropdown-menu>
          </el-dropdown>
          <div>
            <el-button
              v-print="printObj2"
              size="small"
              type="primary"
              @click="ygt_click"
              >鱼骨图打印</el-button
            >
            <el-select
              v-model="isPrint_ygt"
              @change="ygt_change"
              multiple
              placeholder="请选择打印鱼骨图"
              size="small"
            >
              <el-option
                v-for="item in isYGT_names"
                :key="item"
                :label="item"
                :value="item"
              >
              </el-option>
            </el-select>
          </div>
        </el-col>
      </el-row>
    </div>
    <div v-for="(item, index) in json" :key="index">
      <el-card
        class="box-card"
        style="margin-top: 60px"
        v-if="
          json[index].groupName != null &&
          !json[index].groupName.includes('鱼骨图') &&
          !json[index].groupName.includes('填表说明') &&
          !json[index].groupName.includes('事件报告相关信息')
        "
      >
        <div slot="header" class="clearfix">
          <span class="title-text"
            ><i class="el-icon-document-remove"></i
            >{{ json[index].groupName }}</span
          >
        </div>
        <template>
          <el-form
            v-for="(kom, index) in item.groupList"
            :key="index"
            :model="kom"
            ref="ruleForm"
            label-width="auto"
            class="demo-ruleForm"
            :style="
              kom.showType == 1
                ? 'width: 50%; display: inline-block;vertical-align: middle;'
                : kom.inputtype == 5
                ? 'width: 100%; display: inline-block;vertical-align: middle;'
                : kom.inputtype == 10
                ? 'width: 100%; display: inline-block;vertical-align: middle;'
                : kom.showType == null
                ? 'width: 50%; display: inline-block;vertical-align: middle;'
                : 'width: 100%; display: inline-block;vertical-align: middle;'
            "
          >
            <el-form-item
              v-if="kom.isnull && !kom.isDisabled"
              class="item"
              style="width: 100%; display: inline-block"
              :label="kom.name"
              :rules="
                kom.inputtype == 1
                  ? rules.value
                  : kom.inputtype == 2
                  ? rules.value
                  : kom.inputtype == 6
                  ? rules.date
                  : kom.inputtype == 8
                  ? rules.date
                  : kom.inputtype == 3
                  ? rules.checkboxValue
                  : kom.inputtype == 10
                  ? rules.checkboxValue
                  : kom.inputtype == 4
                  ? rules.radioValue
                  : kom.inputtype == 5
                  ? rules.textareaValue
                  : rules.selectValue
              "
              :prop="
                kom.inputtype == 1
                  ? 'value'
                  : kom.inputtype == 2
                  ? 'selectValue'
                  : kom.inputtype == 6
                  ? 'date'
                  : kom.inputtype == 8
                  ? 'datetime'
                  : kom.inputtype == 3
                  ? 'checkboxValue'
                  : kom.inputtype == 10
                  ? 'checkboxValue'
                  : kom.inputtype == 4
                  ? 'radioValue'
                  : kom.inputtype == 5
                  ? 'textareaValue'
                  : 'value'
              "
            >
              <p v-if="kom.inputtype == 9">123</p>
              <el-input
                v-if="kom.inputtype == 1"
                @blur="inputClick(kom.code, kom.value)"
                :disabled="kom.isDisabled"
                v-model="kom.value"
                size="mini"
                class="card-ipt"
              ></el-input>
              <el-select
                v-if="kom.inputtype == 2"
                :disabled="kom.isDisabled"
                v-model="kom.selectValue"
                @change="selectChange(kom.code, kom.selectValue)"
                placeholder="请选择"
                size="mini"
                class="card-ipt"
                clearable
              >
                <el-option
                  v-for="item in kom.dicts"
                  :key="item.code"
                  :label="item.name"
                  :value="item.code"
                >
                </el-option>
              </el-select>
              <el-checkbox-group
                v-else-if="kom.inputtype == 3"
                :disabled="kom.isDisabled"
                v-model="kom.checkboxValue"
                @click="checkboxClick(kom.code, kom.checkboxValue)"
              >
                <el-checkbox
                  v-for="(item, index) in kom.dicts"
                  :key="index"
                  :label="item.code"
                  style="margin-left: 5px; margin-right: 5px; float: left"
                  >{{ item.name }}</el-checkbox
                >
              </el-checkbox-group>
              <el-checkbox-group
                v-else-if="kom.inputtype == 10"
                :disabled="kom.isDisabled"
                v-model="kom.checkboxValue"
                @click="checkboxClick(kom.code, kom.checkboxValue)"
              >
                <el-checkbox
                  v-for="(item, index) in kom.dicts"
                  :key="index"
                  :label="item.code"
                  style="margin-left: 5px; margin-right: 5px; float: left"
                  >{{ item.name }}</el-checkbox
                >
              </el-checkbox-group>
              <el-radio-group
                v-model="kom.radioValue"
                @click="radioClick(kom.code, kom.radioValue)"
                v-for="(it, ind) in kom.dicts"
                :key="ind"
                v-else-if="kom.inputtype == 4"
                :disabled="kom.isDisabled"
              >
                <el-radio :label="it.code" style="margin-left: 10px">{{
                  it.name
                }}</el-radio>
              </el-radio-group>
              <el-input
                v-else-if="kom.inputtype == 5"
                :disabled="kom.isDisabled"
                @input="textareaClick(kom.code, indx, kom.textareaValue)"
                type="textarea"
                placeholder="请输入"
                v-model="kom.textareaValue"
                maxlength="2000"
                show-word-limit
                style="width: 80%"
              />
              <el-date-picker
                v-else-if="kom.inputtype == 6"
                :disabled="kom.isDisabled"
                v-model="kom.date"
                value-format="yyyy-MM-dd"
                @click.stop.prevent="dateClick(kom.code, kom.date)"
                size="mini"
                class="card-ipt"
              ></el-date-picker>
              <el-date-picker
                v-else-if="kom.inputtype == 8"
                type="datetime"
                :disabled="kom.isDisabled"
                v-model="kom.datetime"
                value-format="yyyy-MM-dd HH:mm:ss"
                @click.stop.prevent="dateClick(kom.code, kom.datetime)"
                size="mini"
                class="card-ipt"
              ></el-date-picker>
            </el-form-item>
            <el-form-item
              v-if="kom.isDisabled || !kom.isnull"
              style="width: 100%; display: inline-block"
              :label="kom.name"
            >
              <el-input
                v-if="kom.inputtype == 1"
                :disabled="kom.isDisabled"
                @blur="inputClick(kom.code, kom.value)"
                v-model="kom.value"
                size="mini"
                class="card-ipt"
              ></el-input>
              <el-select
                v-if="kom.inputtype == 2"
                :disabled="kom.isDisabled"
                v-model="kom.selectValue"
                @change="selectChange(kom.code, kom.selectValue)"
                placeholder="请选择"
                size="mini"
                class="card-ipt"
                clearable
              >
                <el-option
                  v-for="item in kom.dicts"
                  :key="item.code"
                  :label="item.name"
                  :value="item.code"
                >
                </el-option>
              </el-select>
              <el-checkbox-group
                v-else-if="kom.inputtype == 3"
                :disabled="kom.isDisabled"
                v-model="kom.checkboxValue"
                @click="checkboxClick(kom.code, kom.checkboxValue)"
              >
                <el-checkbox
                  v-for="(item, index) in kom.dicts"
                  :key="index"
                  :label="item.code"
                  style="margin-left: 5px; margin-right: 5px; float: left"
                  >{{ item.name }}</el-checkbox
                >
              </el-checkbox-group>
              <el-checkbox-group
                v-else-if="kom.inputtype == 10"
                :disabled="kom.isDisabled"
                v-model="kom.checkboxValue"
                @click="checkboxClick(kom.code, kom.checkboxValue)"
              >
                <el-checkbox
                  v-for="(item, index) in kom.dicts"
                  :key="index"
                  :label="item.code"
                  style="margin-left: 5px; margin-right: 5px; float: left"
                  >{{ item.name }}</el-checkbox
                >
              </el-checkbox-group>
              <el-radio-group
                v-model="kom.radioValue"
                @click="radioClick(kom.code, kom.radioValue)"
                v-for="(it, ind) in kom.dicts"
                :key="ind"
                v-else-if="kom.inputtype == 4"
                :disabled="kom.isDisabled"
              >
                <el-radio :label="it.code" style="margin-left: 10px">{{
                  it.name
                }}</el-radio>
              </el-radio-group>
              <el-input
                v-else-if="kom.inputtype == 5"
                :disabled="kom.isDisabled"
                @input="textareaClick(kom.code, indx, kom.textareaValue)"
                type="textarea"
                placeholder="请输入"
                v-model="kom.textareaValue"
                maxlength="2000"
                show-word-limit
                style="width: 80%"
              />
              <el-date-picker
                v-else-if="kom.inputtype == 6"
                :disabled="kom.isDisabled"
                v-model="kom.date"
                value-format="yyyy-MM-dd"
                @click.stop.prevent="dateClick(kom.code, kom.date)"
                size="mini"
                class="card-ipt"
              ></el-date-picker>
              <el-date-picker
                v-else-if="kom.inputtype == 8"
                :disabled="kom.isDisabled"
                type="datetime"
                v-model="kom.datetime"
                value-format="yyyy-MM-dd HH:mm:ss"
                @click.stop.prevent="dateClick(kom.code, kom.datetime)"
                size="mini"
                class="card-ipt"
              ></el-date-picker>
            </el-form-item>
          </el-form>
        </template>
      </el-card>
      <el-card
        class="box-card"
        style="margin-top: 60px"
        v-if="
          json[index].groupName != null &&
          !!json[index].groupName.includes('鱼骨图')
        "
      >
        <div slot="header" class="clearfix">
          <span class="title-text"
            ><i class="el-icon-document-remove"></i
            >{{ json[index].groupName }}</span
          >
        </div>
        <div v-for="(kom, indx) in item.groupList" :key="indx" class="wrap">
          <div
            class="divwrap"
            style="width: 100%; float: left"
            v-if="kom.children.length != 0"
          >
            <span class="ipt-text red dis" v-if="kom.isnull == true">
              {{ kom.name }}
            </span>
            <span class="ipt-text dis yuguName" v-else>{{ kom.name }}：</span>
            <div
              class="yugudiv"
              v-for="(childrenItem, childrenIndex) in kom.children"
              :key="childrenIndex"
            >
              <span class="ipt-text red dis" v-if="childrenItem.isnull == true">
                {{ childrenItem.name }}
              </span>
              <span class="ipt-text dis yuguspan" v-else style="">{{
                childrenItem.name
              }}</span>
              <div v-if="childrenItem.inputtype == 7" class="yugudiv2">
                <el-checkbox-group
                  v-model="kom.yuguValue"
                  @click="yuguClick(kom.code, indx, kom.yuguValue)"
                  :disabled="childrenItem.isDisabled"
                >
                  <el-checkbox
                    v-for="(item, i) in childrenItem.ygtList"
                    :key="i"
                    :label="item.code"
                    style="margin-left: 5px; margin-right: 5px; float: left"
                    >{{ item.name }}</el-checkbox
                  >
                </el-checkbox-group>
              </div>
            </div>
          </div>
          <div class="yugudivnull" v-if="kom.children.length == 0">
            <span class="ipt-text red dis" v-if="kom.isnull == true">
              {{ kom.name }}
            </span>
            <span class="ipt-text dis yugudivnullspan" v-else>{{
              kom.name
            }}</span>
            <div v-if="kom.inputtype == 7" style="height: 100px">
              <el-checkbox-group
                v-model="kom.yuguValue"
                @click="yuguClick(kom.code, indx, kom.yuguValue)"
                :disabled="kom.isDisabled"
              >
                <el-checkbox
                  v-for="(item, o) in kom.ygtList"
                  :key="o"
                  :label="item.code"
                  style="margin-left: 5px; margin-right: 5px; float: left"
                  >{{ item.name }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
          </div>
        </div>
      </el-card>
      <el-card
        class="box-card"
        style="margin-top: 60px"
        v-if="
          json[index].groupName != null &&
          !!json[index].groupName.includes('填表说明')
        "
      >
        <div slot="header" class="clearfix">
          <span class="title-text"
            ><i class="el-icon-document-remove"></i
            >{{ json[index].groupName }}</span
          >
        </div>
        <div v-for="(kom, indx) in item.groupList" :key="indx" class="wrap">
          <div style="margin-bottom: 5px">
            <p>
              {{ kom.name }}
            </p>
          </div>
        </div>
      </el-card>
      <el-card
        class="box-card"
        style="margin-top: 60px"
        v-if="
          json[index].groupName != null &&
          !!json[index].groupName.includes('事件报告相关信息')
        "
      >
        <div slot="header" class="clearfix">
          <span class="title-text"
            ><i class="el-icon-document-remove"></i
            >{{ json[index].groupName }}</span
          >
        </div>
        <template>
          <el-form
            v-for="(kom, index) in item.groupList"
            :key="index"
            :model="kom"
            ref="ruleForm"
            label-width="auto"
            class="demo-ruleForm"
            :style="
              kom.showType == 1
                ? 'width: 50%; display: inline-block;vertical-align: middle;'
                : kom.inputtype == 5
                ? 'width: 100%; display: inline-block;vertical-align: middle;'
                : kom.inputtype == 10
                ? 'width: 100%; display: inline-block;vertical-align: middle;'
                : kom.showType == null
                ? 'width: 50%; display: inline-block;vertical-align: middle;'
                : 'width: 100%; display: inline-block;vertical-align: middle;'
            "
          >
            <el-form-item
              v-if="kom.isnull && !kom.isDisabled"
              class="item"
              style="width: 100%; display: inline-block"
              :label="kom.name"
              :rules="
                kom.inputtype == 1
                  ? rules.value
                  : kom.inputtype == 2
                  ? rules.value
                  : kom.inputtype == 6
                  ? rules.date
                  : kom.inputtype == 8
                  ? rules.date
                  : kom.inputtype == 3
                  ? rules.checkboxValue
                  : kom.inputtype == 10
                  ? rules.checkboxValue
                  : kom.inputtype == 4
                  ? rules.radioValue
                  : kom.inputtype == 5
                  ? rules.textareaValue
                  : rules.selectValue
              "
              :prop="
                kom.inputtype == 1
                  ? 'value'
                  : kom.inputtype == 2
                  ? 'selectValue'
                  : kom.inputtype == 6
                  ? 'date'
                  : kom.inputtype == 8
                  ? 'datetime'
                  : kom.inputtype == 3
                  ? 'checkboxValue'
                  : kom.inputtype == 10
                  ? 'checkboxValue'
                  : kom.inputtype == 4
                  ? 'radioValue'
                  : kom.inputtype == 5
                  ? 'textareaValue'
                  : 'value'
              "
            >
              <p v-if="kom.inputtype == 9">123</p>
              <el-input
                v-if="kom.inputtype == 1"
                @blur="inputClick(kom.code, kom.value)"
                :disabled="kom.isDisabled"
                v-model="kom.value"
                size="mini"
                class="card-ipt"
              ></el-input>
              <el-select
                v-if="kom.inputtype == 2"
                :disabled="kom.isDisabled"
                v-model="kom.selectValue"
                @change="selectChange(kom.code, kom.selectValue)"
                placeholder="请选择"
                size="mini"
                class="card-ipt"
                clearable
              >
                <el-option
                  v-for="item in kom.dicts"
                  :key="item.code"
                  :label="item.name"
                  :value="item.code"
                >
                </el-option>
              </el-select>
              <el-checkbox-group
                v-else-if="kom.inputtype == 3"
                :disabled="kom.isDisabled"
                v-model="kom.checkboxValue"
                @click="checkboxClick(kom.code, kom.checkboxValue)"
              >
                <el-checkbox
                  v-for="(item, index) in kom.dicts"
                  :key="index"
                  :label="item.code"
                  style="margin-left: 5px; margin-right: 5px; float: left"
                  >{{ item.name }}</el-checkbox
                >
              </el-checkbox-group>
              <el-checkbox-group
                v-else-if="kom.inputtype == 10"
                :disabled="kom.isDisabled"
                v-model="kom.checkboxValue"
                @click="checkboxClick(kom.code, kom.checkboxValue)"
              >
                <el-checkbox
                  v-for="(item, index) in kom.dicts"
                  :key="index"
                  :label="item.code"
                  style="margin-left: 5px; margin-right: 5px; float: left"
                  >{{ item.name }}</el-checkbox
                >
              </el-checkbox-group>
              <el-radio-group
                v-model="kom.radioValue"
                @click="radioClick(kom.code, kom.radioValue)"
                v-for="(it, ind) in kom.dicts"
                :key="ind"
                v-else-if="kom.inputtype == 4"
                :disabled="kom.isDisabled"
              >
                <el-radio :label="it.code" style="margin-left: 10px">{{
                  it.name
                }}</el-radio>
              </el-radio-group>
              <el-input
                v-else-if="kom.inputtype == 5"
                :disabled="kom.isDisabled"
                @input="textareaClick(kom.code, indx, kom.textareaValue)"
                type="textarea"
                placeholder="请输入"
                v-model="kom.textareaValue"
                maxlength="2000"
                show-word-limit
                style="width: 80%"
              />
              <el-date-picker
                v-else-if="kom.inputtype == 6"
                :disabled="kom.isDisabled"
                v-model="kom.date"
                value-format="yyyy-MM-dd"
                @click.stop.prevent="dateClick(kom.code, kom.date)"
                size="mini"
                class="card-ipt"
              ></el-date-picker>
              <el-date-picker
                v-else-if="kom.inputtype == 8"
                type="datetime"
                :disabled="kom.isDisabled"
                v-model="kom.datetime"
                value-format="yyyy-MM-dd HH:mm:ss"
                @click.stop.prevent="dateClick(kom.code, kom.datetime)"
                size="mini"
                class="card-ipt"
              ></el-date-picker>
            </el-form-item>
            <el-form-item
              v-if="kom.isDisabled || !kom.isnull"
              style="width: 100%; display: inline-block"
              :label="kom.name"
            >
              <el-input
                v-if="kom.inputtype == 1"
                :disabled="kom.isDisabled"
                @blur="inputClick(kom.code, kom.value)"
                v-model="kom.value"
                size="mini"
                class="card-ipt"
              ></el-input>
              <el-select
                v-if="kom.inputtype == 2"
                :disabled="kom.isDisabled"
                v-model="kom.selectValue"
                @change="selectChange(kom.code, kom.selectValue)"
                placeholder="请选择"
                size="mini"
                class="card-ipt"
                clearable
              >
                <el-option
                  v-for="item in kom.dicts"
                  :key="item.code"
                  :label="item.name"
                  :value="item.code"
                >
                </el-option>
              </el-select>
              <el-checkbox-group
                v-else-if="kom.inputtype == 3"
                :disabled="kom.isDisabled"
                v-model="kom.checkboxValue"
                @click="checkboxClick(kom.code, kom.checkboxValue)"
              >
                <el-checkbox
                  v-for="(item, index) in kom.dicts"
                  :key="index"
                  :label="item.code"
                  style="margin-left: 5px; margin-right: 5px; float: left"
                  >{{ item.name }}</el-checkbox
                >
              </el-checkbox-group>
              <el-checkbox-group
                v-else-if="kom.inputtype == 10"
                :disabled="kom.isDisabled"
                v-model="kom.checkboxValue"
                @click="checkboxClick(kom.code, kom.checkboxValue)"
              >
                <el-checkbox
                  v-for="(item, index) in kom.dicts"
                  :key="index"
                  :label="item.code"
                  style="margin-left: 5px; margin-right: 5px; float: left"
                  >{{ item.name }}</el-checkbox
                >
              </el-checkbox-group>
              <el-radio-group
                v-model="kom.radioValue"
                @click="radioClick(kom.code, kom.radioValue)"
                v-for="(it, ind) in kom.dicts"
                :key="ind"
                v-else-if="kom.inputtype == 4"
                :disabled="kom.isDisabled"
              >
                <el-radio :label="it.code" style="margin-left: 10px">{{
                  it.name
                }}</el-radio>
              </el-radio-group>
              <el-input
                v-else-if="kom.inputtype == 5"
                :disabled="kom.isDisabled"
                @input="textareaClick(kom.code, indx, kom.textareaValue)"
                type="textarea"
                placeholder="请输入"
                v-model="kom.textareaValue"
                maxlength="2000"
                show-word-limit
                style="width: 80%"
              />
              <el-date-picker
                v-else-if="kom.inputtype == 6"
                :disabled="kom.isDisabled"
                v-model="kom.date"
                value-format="yyyy-MM-dd"
                @click.stop.prevent="dateClick(kom.code, kom.date)"
                size="mini"
                class="card-ipt"
              ></el-date-picker>
              <el-date-picker
                v-else-if="kom.inputtype == 8"
                :disabled="kom.isDisabled"
                type="datetime"
                v-model="kom.datetime"
                value-format="yyyy-MM-dd HH:mm:ss"
                @click.stop.prevent="dateClick(kom.code, kom.datetime)"
                size="mini"
                class="card-ipt"
              ></el-date-picker>
            </el-form-item>
          </el-form>
        </template>
        <div>
          信息收集表：
          <el-select v-model="to_up_code" placeholder="请选择" size="mini">
            <el-option
              v-for="item in SJBlist"
              :key="item.id"
              :label="item.name"
              :value="item"
            >
            </el-option>
          </el-select>
          <el-button type="primary" size="mini" plain @click="to_open"
            >跳转</el-button
          >
        </div>
      </el-card>
    </div>

    <!-- 打印 -->
    <div style="display: none; width: 1000px; text-align: left">
      <div class="print" id="print">
        <div class="title">{{ print_data.orgName }}</div>
        <el-row v-if="print_data.eventtype != 2001">
          <el-col :span="9">
            <div
              class="title"
              style="font-size: 14px; text-align: left; margin-left: 20px"
            >
              事件编号：
              <span class="border">{{ eventno }}</span>
            </div>
          </el-col>
          <el-col :span="6">
            <div class="title" style="font-size: 20px">
              （{{ print_data.typeName }}）
            </div>
          </el-col>
          <el-col :span="9">
            <div
              class="title"
              style="font-size: 14px; text-align: right; margin-right: 20px"
            >
              时间：<span class="border">{{ time | time }}</span>
            </div>
          </el-col>
        </el-row>
        <p style="text-align: right">事件名称： {{ eventTypeName }}</p>
        <div v-for="(item, index) in jsonP" :key="index">
          <el-card
            class="box-card"
            style="margin-top: 0px; margin-bottom: 5px"
            v-if="
              json[index].groupName != null &&
              !json[index].groupName.includes('鱼骨图') &&
              !json[index].groupName.includes('填表说明')
            "
          >
            <template>
              <div slot="header" class="clearfix">
                <span class="title-text"
                  ><i class="el-icon-document-remove"></i
                  >{{ jsonP[index].groupName }}</span
                >
              </div>
              <div class="text item">
                <div>
                  <div
                    style="width: 100%"
                    v-for="(kom, index) in item.groupList"
                    :key="index"
                  >
                    <div
                      :class="
                        kom.showType == 1 || kom.showType == null
                          ? 'ipt_div_DY'
                          : 'ipt_div_DY2'
                      "
                      v-if="kom.inputtype && kom.inputtype != 5"
                    >
                      <span
                        class="ipt-text red dis_DY"
                        v-if="kom.isnull == true"
                      >
                        {{ kom.name }}
                      </span>
                      <span class="ipt-text dis_DY" v-else>{{ kom.name }}</span>
                      <span class="value" v-if="kom.inputtype == 1">{{
                        kom.value
                      }}</span>
                      <span class="value" v-if="kom.inputtype == 2">{{
                        kom.selectValue
                      }}</span>
                      <span class="value" v-if="kom.inputtype == 3">{{
                        kom.checkboxValue
                      }}</span>
                      <span class="value" v-if="kom.inputtype == 10">{{
                        kom.checkboxValue
                      }}</span>
                      <span class="value" v-if="kom.inputtype == 4">{{
                        kom.radioValue
                      }}</span>
                      <span class="value" v-if="kom.inputtype == 6"
                        >{{ kom.date }}
                      </span>
                      <span class="value" v-if="kom.inputtype == 8">{{
                        kom.datetime
                      }}</span>
                    </div>
                    <div
                      :class="
                        kom.showType == 1
                          ? 'ipt_div_DY'
                          : kom.inputtype == 5
                          ? 'ipt_div_DY2'
                          : kom.inputtype == 10
                          ? 'ipt_div_DY2'
                          : kom.showType == null
                          ? 'ipt_div_DY'
                          : 'ipt_div_DY2'
                      "
                      style="min-height: 90px"
                      v-if="kom.inputtype && kom.inputtype == 5"
                    >
                      <span
                        class="ipt-text red dis_DY"
                        v-if="kom.isnull == true"
                      >
                        {{ kom.name }}
                      </span>
                      <span class="ipt-text dis_DY" v-else>{{ kom.name }}</span>
                      <span
                        class="value"
                        :style="
                          kom.showType == 1 || kom.showType == null
                            ? 'width: 50%'
                            : 'width: 100%'
                        "
                        v-if="kom.inputtype == 5"
                        >{{ kom.textareaValue }}</span
                      >
                    </div>
                  </div>
                </div>
                <div></div>
              </div>
            </template>
          </el-card>

          <el-card
            class="box-card"
            style="margin-top: 60px"
            v-if="
              json[index].groupName != null &&
              !!json[index].groupName.includes('填表说明')
            "
          >
            <div slot="header" class="clearfix">
              <span class="title-text"
                ><i class="el-icon-document-remove"></i
                >{{ json[index].groupName }}</span
              >
            </div>
            <div v-for="(kom, indx) in item.groupList" :key="indx" class="wrap">
              <div style="margin-bottom: 5px">
                <p>
                  {{ kom.name }}
                </p>
              </div>
            </div>
          </el-card>
        </div>
      </div>
    </div>
    <div
      class="print2"
      id="print2"
      :style="isYgt_print"
      style="width: 1000px; height: 720px; text-align: left; display: none"
      v-if="false"
    >
      <div v-for="(item, iidex) in ygt_print_list" :key="iidex" class="ygt_p">
        <!-- <img
          src="@/assets/yg1.jpg"
          alt=""
          style="width: 1000px; height: 720px"
        /> -->
        <p>
          事件名称： {{ eventTypeName }}
          <span style="margin: 0 5px"></span> 发生科室： {{ reportdeptStr
          }}<span style="margin: 0 5px"></span> 上报人：
          {{ reportuserStr }}
        </p>
        <p
          v-if="ygt_title[iidex].groupName.indexOf('整改措施') == -1"
          style="text-align: center"
        >
          {{ ygt_title[iidex].groupName }}
        </p>
        <div
          class="ygt1_p"
          v-if="ygt_title[iidex].groupName.indexOf('整改措施') == -1"
          style="margin-bottom: 10px"
        >
          <img
            src="@/assets/yg1.jpg"
            alt=""
            style="
              float: left;
              width: 1000px;
              height: 680px;
              position: absolute;
              z-index: -1;
            "
          />
          <div class="r1">
            <p v-for="(item_n_2, iidex2) in item.人" :key="iidex2">
              {{ item_n_2 }}
            </p>
          </div>
          <div class="j1">
            <p v-for="(item_n_3, iidex3) in item.机" :key="iidex3">
              {{ item_n_3 }}
            </p>
          </div>
          <div class="l1">
            <p v-for="(item_n_4, iidex4) in item.料" :key="iidex4">
              {{ item_n_4 }}
            </p>
          </div>
          <div class="c1">
            <p v-for="(item_n_5, iidex5) in item.测" :key="iidex5">
              {{ item_n_5 }}
            </p>
          </div>
          <div class="hh1">
            <p v-for="(item_n_6, iidex6) in item.环" :key="iidex6">
              {{ item_n_6 }}
            </p>
          </div>
          <div class="f1">
            <p v-for="(item_n_7, iidex7) in item.法" :key="iidex7">
              {{ item_n_7 }}
            </p>
          </div>
        </div>
        <!-- 整改措施 -->
        <p
          v-if="ygt_title[iidex].groupName.indexOf('整改措施') !== -1"
          style="text-align: center"
        >
          {{ ygt_title[iidex].groupName }}
        </p>
        <div
          class="ygt2_p"
          v-if="ygt_title[iidex].groupName.indexOf('整改措施') !== -1"
          style="margin-bottom: 10px"
        >
          <img
            src="@/assets/yg2.jpg"
            alt=""
            style="
              float: left;
              width: 1000px;
              height: 680px;
              position: absolute;
              z-index: -1;
            "
          />
          <div class="r1">
            <p v-for="(item_n_2, iidex2) in item.人" :key="iidex2">
              {{ item_n_2 }}
            </p>
          </div>
          <div class="j1">
            <p v-for="(item_n_3, iidex3) in item.机" :key="iidex3">
              {{ item_n_3 }}
            </p>
          </div>
          <div class="l1">
            <p v-for="(item_n_4, iidex4) in item.料" :key="iidex4">
              {{ item_n_4 }}
            </p>
          </div>
          <div class="c1">
            <p v-for="(item_n_5, iidex5) in item.测" :key="iidex5">
              {{ item_n_5 }}
            </p>
          </div>
          <div class="hh1">
            <p v-for="(item_n_6, iidex6) in item.环" :key="iidex6">
              {{ item_n_6 }}
            </p>
          </div>
          <div class="f1">
            <p v-for="(item_n_7, iidex7) in item.法" :key="iidex7">
              {{ item_n_7 }}
            </p>
          </div>
        </div>
      </div>
    </div>
    <div
      class="print2"
      id="print2"
      :style="isYgt_print"
      style="width: 1000px; height: 720px; text-align: left; display: block"
    >
      <div v-for="(item, iidex) in ygt_print_list" :key="iidex" class="ygt_p">
        <!-- <img
          src="@/assets/yg1.jpg"
          alt=""
          style="width: 1000px; height: 720px"
        /> -->
        <p>
          不良事件名称：{{ isInfo.eventName }} 事件名称： {{ eventTypeName }}
          <span style="margin: 0 5px"></span> 发生科室： {{ reportdeptStr
          }}<span style="margin: 0 5px"></span> 上报人：
          {{ reportuserStr }}
        </p>
        <p
          v-if="ygt_title[iidex].groupName.indexOf('整改措施') === -1"
          style="text-align: center"
        >
          {{ ygt_title[iidex].groupName }}
        </p>
        <div
          class="ygt1_p"
          v-if="ygt_title[iidex].groupName.indexOf('整改措施') == -1"
          style="margin-bottom: 10px"
        >
          <img
            src="@/assets/yg1.jpg"
            alt=""
            style="
              float: left;
              width: 1000px;
              height: 680px;
              position: absolute;
              z-index: -1;
            "
          />
          <div class="r1">
            <!-- <p v-for="(item_n_2, iidex2) in item.人" :key="iidex2">
              {{ item_n_2 }}
            </p> -->
            <span style="position: absolute; top: 200px; right: 220px">{{
              item.人[0] ? item.人[0] : ""
            }}</span>
            <span style="position: absolute; top: 215px; right: 210px">{{
              item.人[1] ? item.人[1] : ""
            }}</span>
            <span style="position: absolute; top: 230px; right: 200px">{{
              item.人[2] ? item.人[2] : ""
            }}</span>
            <span style="position: absolute; top: 245px; right: 190px">{{
              item.人[3] ? item.人[3] : ""
            }}</span>
            <span style="position: absolute; top: 260px; right: 180px">{{
              item.人[4] ? item.人[4] : ""
            }}</span>
            <span style="position: absolute; top: 275px; right: 170px">{{
              item.人[5] ? item.人[5] : ""
            }}</span>
            <span style="position: absolute; top: 290px; right: 165px">{{
              item.人[6] ? item.人[6] : ""
            }}</span>
            <span style="position: absolute; top: 305px; right: 160px">{{
              item.人[7] ? item.人[7] : ""
            }}</span>
            <span style="position: absolute; top: 320px; right: 155px">{{
              item.人[8] ? item.人[8] : ""
            }}</span>
            <span style="position: absolute; top: 200px; right: 350px">{{
              item.人[9] ? item.人[9] : ""
            }}</span>
            <span style="position: absolute; top: 215px; right: 340px">{{
              item.人[10] ? item.人[10] : ""
            }}</span>
            <span style="position: absolute; top: 230px; right: 330px">{{
              item.人[11] ? item.人[11] : ""
            }}</span>
            <span style="position: absolute; top: 245px; right: 320px">{{
              item.人[12] ? item.人[12] : ""
            }}</span>
            <span style="position: absolute; top: 260px; right: 310px">{{
              item.人[13] ? item.人[13] : ""
            }}</span>
            <span style="position: absolute; top: 275px; right: 300px">{{
              item.人[14] ? item.人[14] : ""
            }}</span>
            <span style="position: absolute; top: 290px; right: 290px">{{
              item.人[15] ? item.人[15] : ""
            }}</span>
            <span style="position: absolute; top: 305px; right: 280px">{{
              item.人[16] ? item.人[16] : ""
            }}</span>
            <span style="position: absolute; top: 320px; right: 270px">{{
              item.人[17] ? item.人[17] : ""
            }}</span>
          </div>
          <div class="j1">
            <!-- <p v-for="(item_n_3, iidex3) in item.机" :key="iidex3">
              {{ item_n_3 }}
            </p> -->
            <span style="position: absolute; top: 225px; right: 480px">{{
              item.机[0] ? item.机[0] : ""
            }}</span>
            <span style="position: absolute; top: 240px; right: 465px">{{
              item.机[1] ? item.机[1] : ""
            }}</span>
            <span style="position: absolute; top: 255px; right: 455px">{{
              item.机[2] ? item.机[2] : ""
            }}</span>
            <span style="position: absolute; top: 270px; right: 445px">{{
              item.机[3] ? item.机[3] : ""
            }}</span>
            <span style="position: absolute; top: 285px; right: 435px">{{
              item.机[4] ? item.机[4] : ""
            }}</span>
            <span style="position: absolute; top: 300px; right: 425px">{{
              item.机[5] ? item.机[5] : ""
            }}</span>
            <span style="position: absolute; top: 315px; right: 420px">{{
              item.机[6] ? item.机[6] : ""
            }}</span>
            <span style="position: absolute; top: 225px; right: 580px">{{
              item.机[7] ? item.机[7] : ""
            }}</span>
            <span style="position: absolute; top: 240px; right: 565px">{{
              item.机[8] ? item.机[8] : ""
            }}</span>
            <span style="position: absolute; top: 255px; right: 555px">{{
              item.机[9] ? item.机[9] : ""
            }}</span>
            <span style="position: absolute; top: 270px; right: 545px">{{
              item.机[10] ? item.机[10] : ""
            }}</span>
            <span style="position: absolute; top: 285px; right: 535px">{{
              item.机[11] ? item.机[11] : ""
            }}</span>
            <span style="position: absolute; top: 300px; right: 525px">{{
              item.机[12] ? item.机[12] : ""
            }}</span>
            <span style="position: absolute; top: 315px; right: 520px">{{
              item.机[13] ? item.机[13] : ""
            }}</span>
          </div>
          <div class="l1">
            <!-- <p v-for="(item_n_4, iidex4) in item.料" :key="iidex4">
              {{ item_n_4 }}
            </p> -->
            <span style="position: absolute; top: 240px; right: 690px">{{
              item.料[0] ? item.料[0] : ""
            }}</span>
            <span style="position: absolute; top: 255px; right: 680px">{{
              item.料[1] ? item.料[1] : ""
            }}</span>
            <span style="position: absolute; top: 270px; right: 670px">{{
              item.料[2] ? item.料[2] : ""
            }}</span>
            <span style="position: absolute; top: 285px; right: 660px">{{
              item.料[3] ? item.料[3] : ""
            }}</span>
            <span style="position: absolute; top: 300px; right: 650px">{{
              item.料[4] ? item.料[4] : ""
            }}</span>
            <span style="position: absolute; top: 315px; right: 645px">{{
              item.料[5] ? item.料[5] : ""
            }}</span>
            <span style="position: absolute; top: 240px; right: 790px">{{
              item.料[6] ? item.料[6] : ""
            }}</span>
            <span style="position: absolute; top: 255px; right: 780px">{{
              item.料[7] ? item.料[7] : ""
            }}</span>
            <span style="position: absolute; top: 270px; right: 770px">{{
              item.料[8] ? item.料[8] : ""
            }}</span>
            <span style="position: absolute; top: 285px; right: 760px">{{
              item.料[9] ? item.料[9] : ""
            }}</span>
            <span style="position: absolute; top: 300px; right: 750px">{{
              item.料[10] ? item.料[10] : ""
            }}</span>
            <span style="position: absolute; top: 315px; right: 745px">{{
              item.料[11] ? item.料[11] : ""
            }}</span>
          </div>
          <div class="c1">
            <!-- <p v-for="(item_n_5, iidex5) in item.测" :key="iidex5">
              {{ item_n_5 }}
            </p> -->
            <span style="position: absolute; top: 355px; right: 160px">{{
              item.测[0] ? item.测[0] : ""
            }}</span>
            <span style="position: absolute; top: 370px; right: 165px">{{
              item.测[1] ? item.测[1] : ""
            }}</span>
            <span style="position: absolute; top: 385px; right: 170px">{{
              item.测[2] ? item.测[2] : ""
            }}</span>
            <span style="position: absolute; top: 400px; right: 175px">{{
              item.测[3] ? item.测[3] : ""
            }}</span>
            <span style="position: absolute; top: 415px; right: 180px">{{
              item.测[4] ? item.测[4] : ""
            }}</span>
            <span style="position: absolute; top: 430px; right: 185px">{{
              item.测[5] ? item.测[5] : ""
            }}</span>
            <span style="position: absolute; top: 445px; right: 190px">{{
              item.测[6] ? item.测[6] : ""
            }}</span>
            <span style="position: absolute; top: 460px; right: 200px">{{
              item.测[7] ? item.测[7] : ""
            }}</span>
            <span style="position: absolute; top: 475px; right: 210px">{{
              item.测[8] ? item.测[8] : ""
            }}</span>

            <span style="position: absolute; top: 355px; right: 260px">{{
              item.测[9] ? item.测[9] : ""
            }}</span>
            <span style="position: absolute; top: 370px; right: 265px">{{
              item.测[10] ? item.测[10] : ""
            }}</span>
            <span style="position: absolute; top: 385px; right: 270px">{{
              item.测[11] ? item.测[11] : ""
            }}</span>
            <span style="position: absolute; top: 400px; right: 275px">{{
              item.测[12] ? item.测[12] : ""
            }}</span>
            <span style="position: absolute; top: 415px; right: 280px">{{
              item.测[13] ? item.测[13] : ""
            }}</span>
            <span style="position: absolute; top: 430px; right: 285px">{{
              item.测[14] ? item.测[14] : ""
            }}</span>
            <span style="position: absolute; top: 445px; right: 290px">{{
              item.测[15] ? item.测[15] : ""
            }}</span>
            <span style="position: absolute; top: 460px; right: 300px">{{
              item.测[16] ? item.测[16] : ""
            }}</span>
            <span style="position: absolute; top: 475px; right: 310px">{{
              item.测[17] ? item.测[17] : ""
            }}</span>
          </div>
          <div class="hh1">
            <!-- <p v-for="(item_n_6, iidex6) in item.环" :key="iidex6">
              {{ item_n_6 }}
            </p> -->
            <span style="position: absolute; top: 355px; right: 420px">{{
              item.环[0] ? item.环[0] : ""
            }}</span>
            <span style="position: absolute; top: 370px; right: 425px">{{
              item.环[1] ? item.环[1] : ""
            }}</span>
            <span style="position: absolute; top: 385px; right: 430px">{{
              item.环[2] ? item.环[2] : ""
            }}</span>
            <span style="position: absolute; top: 400px; right: 435px">{{
              item.环[3] ? item.环[3] : ""
            }}</span>
            <span style="position: absolute; top: 415px; right: 440px">{{
              item.环[4] ? item.环[4] : ""
            }}</span>
            <span style="position: absolute; top: 430px; right: 450px">{{
              item.环[5] ? item.环[5] : ""
            }}</span>
            <span style="position: absolute; top: 445px; right: 460px">{{
              item.环[6] ? item.环[6] : ""
            }}</span>
            <span style="position: absolute; top: 460px; right: 475px">{{
              item.环[7] ? item.环[7] : ""
            }}</span>

            <span style="position: absolute; top: 355px; right: 520px">{{
              item.环[8] ? item.环[8] : ""
            }}</span>
            <span style="position: absolute; top: 370px; right: 525px">{{
              item.环[9] ? item.环[9] : ""
            }}</span>
            <span style="position: absolute; top: 385px; right: 530px">{{
              item.环[10] ? item.环[10] : ""
            }}</span>
            <span style="position: absolute; top: 400px; right: 535px">{{
              item.环[11] ? item.环[11] : ""
            }}</span>
            <span style="position: absolute; top: 415px; right: 540px">{{
              item.环[12] ? item.环[12] : ""
            }}</span>
            <span style="position: absolute; top: 430px; right: 550px">{{
              item.环[13] ? item.环[13] : ""
            }}</span>
            <span style="position: absolute; top: 445px; right: 560px">{{
              item.环[14] ? item.环[14] : ""
            }}</span>
            <span style="position: absolute; top: 460px; right: 575px">{{
              item.环[15] ? item.环[15] : ""
            }}</span>
          </div>
          <div class="f1">
            <!-- <p v-for="(item_n_7, iidex7) in item.法" :key="iidex7">
              {{ item_n_7 }}
            </p> -->
            <span style="position: absolute; top: 355px; right: 640px">{{
              item.法[0] ? item.法[0] : ""
            }}</span>
            <span style="position: absolute; top: 370px; right: 645px">{{
              item.法[1] ? item.法[1] : ""
            }}</span>
            <span style="position: absolute; top: 385px; right: 650px">{{
              item.法[2] ? item.法[2] : ""
            }}</span>
            <span style="position: absolute; top: 400px; right: 655px">{{
              item.法[3] ? item.法[3] : ""
            }}</span>
            <span style="position: absolute; top: 415px; right: 665px">{{
              item.法[3] ? item.法[3] : ""
            }}</span>
            <span style="position: absolute; top: 430px; right: 675px">{{
              item.法[4] ? item.法[4] : ""
            }}</span>
            <span style="position: absolute; top: 445px; right: 685px">{{
              item.法[5] ? item.法[5] : ""
            }}</span>

            <span style="position: absolute; top: 355px; right: 740px">{{
              item.法[6] ? item.法[6] : ""
            }}</span>
            <span style="position: absolute; top: 370px; right: 745px">{{
              item.法[7] ? item.法[7] : ""
            }}</span>
            <span style="position: absolute; top: 385px; right: 750px">{{
              item.法[8] ? item.法[8] : ""
            }}</span>
            <span style="position: absolute; top: 400px; right: 755px">{{
              item.法[9] ? item.法[9] : ""
            }}</span>
            <span style="position: absolute; top: 415px; right: 765px">{{
              item.法[10] ? item.法[10] : ""
            }}</span>
            <span style="position: absolute; top: 430px; right: 775px">{{
              item.法[11] ? item.法[11] : ""
            }}</span>
            <span style="position: absolute; top: 445px; right: 785px">{{
              item.法[12] ? item.法[12] : ""
            }}</span>
          </div>
        </div>
        <!-- 整改措施 -->
        <p
          v-if="ygt_title[iidex].groupName.indexOf('整改措施') !== -1"
          style="text-align: center"
        >
          {{ ygt_title[iidex].groupName }}
        </p>
        <div
          class="ygt2_p"
          v-if="ygt_title[iidex].groupName.indexOf('整改措施') !== -1"
          style="margin-bottom: 10px"
        >
          <img
            src="@/assets/yg2.jpg"
            alt=""
            style="
              float: left;
              width: 1000px;
              height: 680px;
              position: absolute;
              z-index: -1;
            "
          />
          <div class="r1">
            <!-- <p v-for="(item_n_2, iidex2) in item.人" :key="iidex2">
              {{ item_n_2 }}
            </p> -->
            <span style="position: absolute; top: 260px; right: 600px">{{
              item.人[0] ? item.人[0] : ""
            }}</span>
            <span style="position: absolute; top: 275px; right: 610px">{{
              item.人[1] ? item.人[1] : ""
            }}</span>
            <span style="position: absolute; top: 290px; right: 625px">{{
              item.人[2] ? item.人[2] : ""
            }}</span>
            <span style="position: absolute; top: 305px; right: 640px">{{
              item.人[3] ? item.人[3] : ""
            }}</span>
            <span style="position: absolute; top: 320px; right: 655px">{{
              item.人[4] ? item.人[4] : ""
            }}</span>
            <span style="position: absolute; top: 335px; right: 665px">{{
              item.人[5] ? item.人[5] : ""
            }}</span>
            <span style="position: absolute; top: 350px; right: 680px">{{
              item.人[6] ? item.人[6] : ""
            }}</span>
            <span style="position: absolute; top: 365px; right: 690px">{{
              item.人[7] ? item.人[7] : ""
            }}</span>
            <span style="position: absolute; top: 380px; right: 695px">{{
              item.人[8] ? item.人[8] : ""
            }}</span>
            <span style="position: absolute; top: 260px; right: 700px">{{
              item.人[9] ? item.人[9] : ""
            }}</span>
            <span style="position: absolute; top: 275px; right: 710px">{{
              item.人[10] ? item.人[10] : ""
            }}</span>
            <span style="position: absolute; top: 290px; right: 725px">{{
              item.人[11] ? item.人[11] : ""
            }}</span>
            <span style="position: absolute; top: 305px; right: 740px">{{
              item.人[12] ? item.人[12] : ""
            }}</span>
            <span style="position: absolute; top: 320px; right: 755px">{{
              item.人[13] ? item.人[13] : ""
            }}</span>
            <span style="position: absolute; top: 335px; right: 765px">{{
              item.人[14] ? item.人[14] : ""
            }}</span>
            <span style="position: absolute; top: 350px; right: 780px">{{
              item.人[15] ? item.人[15] : ""
            }}</span>
            <span style="position: absolute; top: 365px; right: 790px">{{
              item.人[16] ? item.人[16] : ""
            }}</span>
            <span style="position: absolute; top: 380px; right: 795px">{{
              item.人[17] ? item.人[17] : ""
            }}</span>
          </div>
          <div class="j1">
            <!-- <p v-for="(item_n_3, iidex3) in item.机" :key="iidex3">
              {{ item_n_3 }}
            </p> -->
            <span style="position: absolute; top: 265px; right: 400px">{{
              item.机[0] ? item.机[0] : ""
            }}</span>
            <span style="position: absolute; top: 280px; right: 410px">{{
              item.机[1] ? item.机[1] : ""
            }}</span>
            <span style="position: absolute; top: 295px; right: 420px">{{
              item.机[2] ? item.机[2] : ""
            }}</span>
            <span style="position: absolute; top: 310px; right: 435px">{{
              item.机[3] ? item.机[3] : ""
            }}</span>
            <span style="position: absolute; top: 325px; right: 450px">{{
              item.机[4] ? item.机[4] : ""
            }}</span>
            <span style="position: absolute; top: 340px; right: 465px">{{
              item.机[5] ? item.机[5] : ""
            }}</span>
            <span style="position: absolute; top: 355px; right: 480px">{{
              item.机[6] ? item.机[6] : ""
            }}</span>
            <span style="position: absolute; top: 370px; right: 490px">{{
              item.机[7] ? item.机[7] : ""
            }}</span>
            <span style="position: absolute; top: 385px; right: 495px">{{
              item.机[8] ? item.机[8] : ""
            }}</span>
            <span style="position: absolute; top: 265px; right: 500px">{{
              item.机[9] ? item.机[9] : ""
            }}</span>
            <span style="position: absolute; top: 280px; right: 510px">{{
              item.机[10] ? item.机[10] : ""
            }}</span>
            <span style="position: absolute; top: 295px; right: 520px">{{
              item.机[11] ? item.机[11] : ""
            }}</span>
            <span style="position: absolute; top: 310px; right: 535px">{{
              item.机[12] ? item.机[12] : ""
            }}</span>
            <span style="position: absolute; top: 325px; right: 550px">{{
              item.机[13] ? item.机[13] : ""
            }}</span>
            <span style="position: absolute; top: 340px; right: 565px">{{
              item.机[14] ? item.机[14] : ""
            }}</span>
            <span style="position: absolute; top: 355px; right: 580px">{{
              item.机[15] ? item.机[15] : ""
            }}</span>
            <span style="position: absolute; top: 370px; right: 590px">{{
              item.机[16] ? item.机[16] : ""
            }}</span>
            <span style="position: absolute; top: 385px; right: 595px">{{
              item.机[17] ? item.机[17] : ""
            }}</span>
          </div>
          <div class="l1">
            <!-- <p v-for="(item_n_4, iidex4) in item.料" :key="iidex4">
              {{ item_n_4 }}
            </p> -->
            <span style="position: absolute; top: 295px; right: 230px">{{
              item.料[0] ? item.料[0] : ""
            }}</span>
            <span style="position: absolute; top: 310px; right: 240px">{{
              item.料[1] ? item.料[1] : ""
            }}</span>
            <span style="position: absolute; top: 325px; right: 255px">{{
              item.料[2] ? item.料[2] : ""
            }}</span>
            <span style="position: absolute; top: 340px; right: 270px">{{
              item.料[3] ? item.料[3] : ""
            }}</span>
            <span style="position: absolute; top: 355px; right: 285px">{{
              item.料[4] ? item.料[4] : ""
            }}</span>
            <span style="position: absolute; top: 370px; right: 295px">{{
              item.料[5] ? item.料[5] : ""
            }}</span>
            <span style="position: absolute; top: 385px; right: 300px">{{
              item.料[6] ? item.料[6] : ""
            }}</span>
            <span style="position: absolute; top: 280px; right: 310px">{{
              item.料[7] ? item.料[7] : ""
            }}</span>
            <span style="position: absolute; top: 295px; right: 320px">{{
              item.料[8] ? item.料[8] : ""
            }}</span>
            <span style="position: absolute; top: 310px; right: 335px">{{
              item.料[9] ? item.料[9] : ""
            }}</span>
            <span style="position: absolute; top: 325px; right: 350px">{{
              item.料[10] ? item.料[10] : ""
            }}</span>
            <span style="position: absolute; top: 340px; right: 365px">{{
              item.料[11] ? item.料[11] : ""
            }}</span>
            <span style="position: absolute; top: 355px; right: 375px">{{
              item.料[12] ? item.料[12] : ""
            }}</span>
            <span style="position: absolute; top: 370px; right: 380px">{{
              item.料[13] ? item.料[13] : ""
            }}</span>
            <span style="position: absolute; top: 385px; right: 390px">{{
              item.料[14] ? item.料[14] : ""
            }}</span>
          </div>
          <div class="c1">
            <!-- <p v-for="(item_n_5, iidex5) in item.测" :key="iidex5">
              {{ item_n_5 }}
            </p> -->
            <span style="position: absolute; top: 420px; right: 285px">{{
              item.测[0] ? item.测[0] : ""
            }}</span>
            <span style="position: absolute; top: 435px; right: 275px">{{
              item.测[1] ? item.测[1] : ""
            }}</span>
            <span style="position: absolute; top: 450px; right: 265px">{{
              item.测[2] ? item.测[2] : ""
            }}</span>
            <span style="position: absolute; top: 465px; right: 250px">{{
              item.测[3] ? item.测[3] : ""
            }}</span>
            <span style="position: absolute; top: 480px; right: 235px">{{
              item.测[4] ? item.测[4] : ""
            }}</span>
            <span style="position: absolute; top: 495px; right: 220px">{{
              item.测[5] ? item.测[5] : ""
            }}</span>
            <span style="position: absolute; top: 510px; right: 205px">{{
              item.测[6] ? item.测[6] : ""
            }}</span>

            <span style="position: absolute; top: 420px; right: 385px">{{
              item.测[7] ? item.测[7] : ""
            }}</span>
            <span style="position: absolute; top: 435px; right: 375px">{{
              item.测[8] ? item.测[8] : ""
            }}</span>
            <span style="position: absolute; top: 450px; right: 365px">{{
              item.测[9] ? item.测[9] : ""
            }}</span>
            <span style="position: absolute; top: 465px; right: 350px">{{
              item.测[10] ? item.测[10] : ""
            }}</span>
            <span style="position: absolute; top: 480px; right: 335px">{{
              item.测[11] ? item.测[11] : ""
            }}</span>
            <span style="position: absolute; top: 495px; right: 320px">{{
              item.测[12] ? item.测[12] : ""
            }}</span>
            <span style="position: absolute; top: 510px; right: 305px">{{
              item.测[13] ? item.测[13] : ""
            }}</span>
          </div>
          <div class="hh1">
            <!-- <p v-for="(item_n_6, iidex6) in item.环" :key="iidex6">
              {{ item_n_6 }}
            </p> -->
            <span style="position: absolute; top: 420px; right: 490px">{{
              item.环[0] ? item.环[0] : ""
            }}</span>
            <span style="position: absolute; top: 435px; right: 480px">{{
              item.环[1] ? item.环[1] : ""
            }}</span>
            <span style="position: absolute; top: 450px; right: 470px">{{
              item.环[2] ? item.环[2] : ""
            }}</span>
            <span style="position: absolute; top: 465px; right: 460px">{{
              item.环[3] ? item.环[3] : ""
            }}</span>
            <span style="position: absolute; top: 480px; right: 450px">{{
              item.环[4] ? item.环[4] : ""
            }}</span>
            <span style="position: absolute; top: 495px; right: 435px">{{
              item.环[5] ? item.环[5] : ""
            }}</span>
            <span style="position: absolute; top: 510px; right: 420px">{{
              item.环[6] ? item.环[6] : ""
            }}</span>
            <span style="position: absolute; top: 525px; right: 405px">{{
              item.环[7] ? item.环[7] : ""
            }}</span>
          </div>
          <div class="f1">
            <!-- <p v-for="(item_n_7, iidex7) in item.法" :key="iidex7">
              {{ item_n_7 }}
            </p> -->
            <span style="position: absolute; top: 420px; right: 620px">{{
              item.法[0] ? item.法[0] : ""
            }}</span>
            <span style="position: absolute; top: 435px; right: 610px">{{
              item.法[1] ? item.法[1] : ""
            }}</span>
            <span style="position: absolute; top: 450px; right: 600px">{{
              item.法[2] ? item.法[2] : ""
            }}</span>
            <span style="position: absolute; top: 465px; right: 590px">{{
              item.法[3] ? item.法[3] : ""
            }}</span>
            <span style="position: absolute; top: 480px; right: 580px">{{
              item.法[4] ? item.法[4] : ""
            }}</span>
            <span style="position: absolute; top: 495px; right: 565px">{{
              item.法[5] ? item.法[5] : ""
            }}</span>
            <span style="position: absolute; top: 510px; right: 550px">{{
              item.法[6] ? item.法[6] : ""
            }}</span>
            <span style="position: absolute; top: 525px; right: 535px">{{
              item.法[7] ? item.法[7] : ""
            }}</span>
            <span style="position: absolute; top: 540px; right: 520px">{{
              item.法[8] ? item.法[8] : ""
            }}</span>

            <span style="position: absolute; top: 420px; right: 720px">{{
              item.法[9] ? item.法[9] : ""
            }}</span>
            <span style="position: absolute; top: 435px; right: 710px">{{
              item.法[10] ? item.法[10] : ""
            }}</span>
            <span style="position: absolute; top: 450px; right: 700px">{{
              item.法[11] ? item.法[11] : ""
            }}</span>
            <span style="position: absolute; top: 465px; right: 690px">{{
              item.法[12] ? item.法[12] : ""
            }}</span>
            <span style="position: absolute; top: 480px; right: 680px">{{
              item.法[13] ? item.法[13] : ""
            }}</span>
            <span style="position: absolute; top: 495px; right: 665px">{{
              item.法[14] ? item.法[14] : ""
            }}</span>
            <span style="position: absolute; top: 510px; right: 650px">{{
              item.法[15] ? item.法[15] : ""
            }}</span>
            <span style="position: absolute; top: 525px; right: 635px">{{
              item.法[16] ? item.法[16] : ""
            }}</span>
            <span style="position: absolute; top: 540px; right: 620px">{{
              item.法[17] ? item.法[17] : ""
            }}</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import print from "vue-print-nb";
export default {
  directives: {
    print,
  },
  data() {
    return {
      printObj: {
        id: "print", // 打印区域的id属性值
        // 其他属性请参阅官方文档，这里仅实现最基础的功能
      },
      printObj2: {
        id: "print2", // 打印区域的id属性值
        // 其他属性请参阅官方文档，这里仅实现最基础的功能
        openCallback() {
          this.isYgt_print = "display:none";
        }, // 调用打印之后的回调事件
        closeCallback() {
          this.isYgt_print = "display:none";
        }, //关闭打印的回调事件（无法确定点击的是确认还是取消）
      },
      json: {},
      jsonP: [],
      sendObj: { reporttime: "" },
      submitObj: null,
      isShowFlag: false,
      eventno: "",
      reportdeptStr: "",
      reportuserStr: "",
      eventTypeName: "",
      isShow: true,
      time: "",
      print_data: {},
      Btn_show: false,
      isYGT_names: [],
      isPrint_ygt: [],
      ygt_print_list: [],
      isYgt_print: "display:none",
      ygt_title: [],
      isInfo: {},
      rules: {
        value: [{ required: true, message: "此项为必选项", trigger: "blur" }],
        selectValue: [
          { required: true, message: "此项为必选项", trigger: "change" },
        ],
        date: [
          {
            required: true,
            message: "此项为必选项",
            trigger: "change",
          },
        ],
        textareaValue: [
          { required: true, message: "此项为必选项", trigger: "blur" },
        ],
        radioValue: [
          { required: true, message: "此项为必选项", trigger: "change" },
        ],
        checkboxValue: [
          { required: true, message: "此项为必选项", trigger: "change" },
        ],
        isbtnLoading: false,
      },
      isbtn_no: false,
      baseUrl: baseUrl,
      SJBlist: [],
      to_up_code: "",
    };
  },
  created() {
    // this.$route;
    if (this.$route) {
      // if (this.$route.query.flag2) {
      //   this.isShowFlag = true;
      //   this.eventno = this.$route.query.eventCode;
      //   console.log(this.$route.query);
      //   this.$get(
      //     "/Aers/ReportEventmainTemp/GetItem?id=" + this.$route.query.id
      //   ).then((res) => {
      //     this.isInfo = res.data;
      //     this.code = res.data.eventcode;
      //     this.json = JSON.parse(res.data.json).list;
      //   });
      //   return;
      // }
      this.reportdeptStr = this.$route.query.reportdeptStr;
      this.reportuserStr = this.$route.query.reportuserStr;
      this.eventTypeName = this.$route.query.eventTypeName;
      if (this.$route.query.flag) {
        this.isShow = false;
      }
      if (this.$route.query.eventno) {
        this.isShowFlag = true;
        this.eventno = this.$route.query.eventno;
      }
      // if (this.$route.query.Btn_show) {
      //   this.Btn_show = true;
      // }
      this.$get("/Aers/ReportEvent/GetItem?id=" + this.$route.query.id).then(
        (res) => {
          this.getInit(this.eventno);
          this.isInfo = res.data;
          console.log(this.isInfo);
          this.code = res.data.eventcode;
          this.json = JSON.parse(res.data.json).list;
          console.log(JSON.parse(res.data.json));
        }
      );

      this.$get(
        "/Aers/ReportEvent/GetItemPrint?id=" + this.$route.query.id
      ).then((res) => {
        this.time = res.data.reporttime;
        this.sendObj.reporttime = res.data.reporttime;
        this.print_data = res.data;
        this.jsonP = JSON.parse(res.data.json).list;
        console.log("打印", this.jsonP);
        console.log(this.print_data);
        var names = [];
        for (var i in this.jsonP) {
          if (
            !!this.jsonP[i].groupName &&
            !!this.jsonP[i].groupName.includes("鱼骨图")
          ) {
            if (
              this.jsonP[i].groupName == "鱼骨图（存在问题）" ||
              this.jsonP[i].groupName == "鱼骨图（原因分析）"
            ) {
              names.push("鱼骨图（原因分析）");
            } else {
              names.push(this.jsonP[i].groupName);
            }
          }
        }
        this.isYGT_names = names;
      });
    }
  },
  mounted() {
    this.getSJBlist();
  },
  methods: {
    getInit(code) {
      this.$get(`/Aers/ReportEvent/GetFlowNextList?eventno=${code}`).then(
        (res) => {
          if (res.code == 200) {
            this.submitObj = res.data;
          }
        }
      );
    },
    inputClick(code, value) {
      for (let key in this.sendObj) {
        if (key == code) {
          this.sendObj[key] = value;
        }
      }
    },
    selectChange(code, value) {
      for (let key in this.sendObj) {
        if (key == code) {
          this.sendObj[key] = value;
        }
      }
    },
    checkboxClick(code, value) {
      for (let key in this.sendObj) {
        if (key == code) {
          this.sendObj[key] = value;
        }
      }
    },
    radioClick(code, value) {
      for (let key in this.sendObj) {
        if (key == code) {
          this.sendObj[key] = value;
        }
      }
    },
    textareaClick(code, value) {
      for (let key in this.sendObj) {
        if (key == code) {
          this.sendObj[key] = value;
        }
      }
    },
    dateClick(code, value) {
      for (let key in this.sendObj) {
        if (key == code) {
          this.sendObj[key] = value;
        }
      }
    },
    yuguClick(code, value) {
      alert(1);
      for (let key in this.sendObj) {
        if (key == code) {
          this.sendObj[key] = value;
        }
      }
    },
    submit(command) {
      this.isbtnLoading = true;
      this.sendObj.eventNo = this.eventno;
      this.sendObj.linkId = command;
      this.sendObj.list = this.json;
      this.$post("/Aers/ReportEvent/HandleTask", this.sendObj).then((res) => {
        if (res.code == 200) {
          this.$message.success("操作成功，请手动关闭此页面！");
          this.isbtnLoading = false;
          this.isbtn_no = true;
        }
      });
    },
    submit2() {
      this.sendObj.eventNo = this.eventno;
      this.sendObj.list = this.json;
      this.$post("/Aers/ReportEvent/HandleTaskTemp", this.sendObj).then(
        (res) => {
          if (res.code == 200) {
            this.$message.success("暂存成功，请手动关闭此页面！");
          }
        }
      );
    },
    ygt_change() {
      var list = [];
      var list2 = [];
      for (var i in this.isPrint_ygt) {
        for (var j in this.jsonP) {
          if (this.isPrint_ygt[i] == this.jsonP[j].groupName) {
            list.push(this.jsonP[j]);
          }
        }
      }

      for (var k in list) {
        var item = {
          人: [],
          机: [],
          料: [],
          法: [],
          环: [],
          测: [],
        };
        for (var o in list[k].groupList) {
          if (list[k].groupList[o].name == "人") {
            item.人 = list[k].groupList[o].yuguValue.split(",");
          }
          if (list[k].groupList[o].name == "机") {
            item.机 = list[k].groupList[o].yuguValue.split(",");
          }
          if (list[k].groupList[o].name == "料") {
            item.料 = list[k].groupList[o].yuguValue.split(",");
          }
          if (list[k].groupList[o].name == "法") {
            item.法 = list[k].groupList[o].yuguValue.split(",");
          }
          if (list[k].groupList[o].name == "环") {
            item.环 = list[k].groupList[o].yuguValue.split(",");
          }
          if (list[k].groupList[o].name == "测") {
            item.测 = list[k].groupList[o].yuguValue.split(",");
          }
        }
        list2.push(item);
        this.ygt_print_list = list2;
        // console.log(this.ygt_print_list);
        console.log(list);
        this.ygt_title = list;
        console.log(list2);
      }
    },
    ygt_click() {
      console.log(this.ygt_title);
      this.isYgt_print = "display:block";
    },
    to_print() {
      window.open(
        baseUrl.baseIP + "/T1/api/v1/Aers/pdf/getpdf?id=" + this.$route.query.id
      );
    },
    getSJBlist() {
      var body = {
        currentPage: 1,
        pageSize: 15,
        filter: {
          key: "",
          withDisable: true,
          typeCode: 2001,
          typeName: "",
          startTime: "",
          endTime: "",
          delFlag: false,
        },
      };
      this.$post("/Aers/ZdEvent/GetList", body).then((res) => {
        this.SJBlist = res.data.list;
      });
    },
    to_open() {
      console.log(row);
      var row = this.to_up_code;
      // window.open(
      //   "/#/operation?eventCode=" +
      //     row.code +
      //     "&eventName=" +
      //     row.name +
      //     "&Token=" +
      //     localStorage.getItem("Token")
      // );
      this.$router.push(
        "/operation?eventCode=" +
          row.code +
          "&eventName=" +
          row.name +
          "&Token=" +
          localStorage.getItem("Token")
      );
    },
    back_page() {
      this.$router.go(-1);
    },
  },
};
</script>
<style scoped lang="scss">
.topDiv {
  height: 60px;
  width: 100%;
  line-height: 60px;
  position: fixed;
  top: 46px;
  z-index: 999;
  background: #e8f2fe;
}
.title-text {
  color: #1e8bc2;
  font-weight: bold;
}
.text {
  font-size: 14px;
}

.item {
  margin-bottom: 18px;
}
.el-card ::v-deep .el-card__header {
  padding: 10px 20px;
  background-color: #e2e2e2;
}
.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}
.clearfix:after {
  clear: both;
}

.box-card {
  margin: 20px;
  padding-bottom: 15px;
}
.card-ipt {
  width: 200px;
}
.red {
  font-weight: 600;
  color: #ff0000;
}
.el-row {
  margin-bottom: 10px;
  &:last-child {
    margin-bottom: 0;
  }
}
.ipt-area {
  margin-top: 20px;
}
.mt20 {
  margin-top: 20px;
}
.border {
  border-bottom: 1px solid #ccc;
}
.ipt_div {
  width: 50%;
  /* min-height: 50px; */
  margin-bottom: 10px;
  float: left;
  /* margin-bottom: -10px; */
}
.ipt_div_DY2 {
  width: 100%;
  /* min-height: 50px; */
  margin-bottom: 10px;
  float: left;
}
.ipt_div_DY {
  width: 50%;
  /* min-height: 50px; */
  margin-bottom: 10px;
  float: left;
}
.ipt_divw {
  width: 100%;
  /* min-height: 80px; */
  float: left;
  margin-bottom: 3px;
}
.ipt_divw span {
  width: 100%;
  height: 30px;
  display: block;
}
.dis {
  width: 180px;
  display: block;
  float: left;
}
.dis_DY {
  display: block;
  float: left;
}
.yuguName {
  width: 300px;
  height: 60px;
  line-height: 60px;
  border-bottom: 1px solid #ccc;
}
.wrap:nth-child(2) .divwrap .yuguName {
  width: 300px;
  height: 660px;
  line-height: 660px;
  border-bottom: 1px solid #ccc;
}

.yugudiv {
  height: 60px;
  white-space: nowrap;
  overflow: hidden;
}
.yuguspan {
  width: 100px;
  /* height: 60px; */
  /* line-height: 60px; */
  border-bottom: 1px solid #ccc;
}
.yugudiv2 {
  height: 60px;
  border-bottom: 1px solid #ccc;
}
.divwrap .yugudiv:nth-child(2) {
  height: 120px !important;
}
.divwrap .yugudiv:nth-child(2) .yuguspan {
  width: 100px;
  /* height: 120px !important; */
  /* line-height: 120px !important; */
  border-bottom: 1px solid #ccc;
}
.divwrap .yugudiv:nth-child(2) .yugudiv2 {
  height: 120px !important;
  border-bottom: 1px solid #ccc !important;
}
.yugudivnull {
  width: 100%;
  float: left;
  border-bottom: 1px solid #ccc;
  height: 80px;
}
.yugudivnullspan {
  display: block;
  width: 300px;
  height: 80px;
  line-height: 80px;
}
.box-warp {
  float: left;
}
.box-warp > a {
  display: flex;
  color: #333;
  margin-left: 10px;
}
.p {
  width: 20px;
  height: 20px;
  border: 1px solid #ccc;
}
.checked {
  color: red !important;
}
::v-deep .el-input.is-disabled .el-input__inner {
  color: #000 !important;
}
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner::after {
  background-color: #000;
}
::v-deep .el-radio__input.is-disabled .el-radio__inner,
.el-radio__input.is-disabled.is-checked .el-radio__inner {
  border-color: #000;
}
.value {
  display: inline-block;
  border-bottom: 1px solid #000;
  min-width: 60px;
}
/* 打印 */
.title {
  font-size: 26px;
  font-weight: 700;
  text-align: center;
}
.border {
  border-bottom: 1px solid #000;
}

.ygt1_p {
  width: 1000px;
  height: 680px;
  border: 1px solid #000;
  font-size: 12px;
  //   background-image: url("../assets/yg1.jpg");
  //   background-size: cover;
  //   background-repeat: no-repeat;
  //   background-position: center;
  position: relative;
  .r1 {
    width: 200px;
    float: right;
    margin-top: 216px;
    margin-right: 160px;
  }
  .j1 {
    width: 200px;
    float: right;
    margin-top: 232px;
    margin-right: 29px;
  }
  .l1 {
    width: 200px;
    float: right;
    margin-top: 261px;
    margin-right: 42px;
  }
  .c1 {
    width: 200px;
    float: right;
    margin-top: 387px;
    margin-right: -672px;
  }
  .hh1 {
    width: 200px;
    float: right;
    margin-top: 381px;
    margin-right: -500px;
  }
  .f1 {
    width: 200px;
    float: right;
    margin-top: 382px;
    margin-right: -216px;
  }
}
.ygt2_p {
  width: 1000px;
  height: 680px;
  border: 1px solid #000;
  font-size: 12px;
  //   background-image: url("../assets/yg1.jpg");
  //   background-size: cover;
  //   background-repeat: no-repeat;
  //   background-position: center;
  position: relative;
  .r1 {
    width: 200px;
    float: right;
    margin-top: 275px;
    margin-right: 603px;
  }
  .j1 {
    width: 200px;
    float: right;
    margin-top: -142px;
    margin-right: 329px;
  }
  .l1 {
    width: 200px;
    float: right;
    margin-top: -136px;
    margin-right: 132px;
  }
  .c1 {
    width: 200px;
    float: right;
    margin-top: 25px;
    margin-right: 8px;
  }
  .hh1 {
    width: 200px;
    float: right;
    margin-top: 26px;
    margin-right: 3px;
  }
  .f1 {
    width: 200px;
    float: right;
    margin-top: 27px;
    margin-right: 125px;
  }
}
@media print {
  .ygt1_p {
    -webkit-print-color-adjust: exact;
    -moz-print-color-adjust: exact;
    -ms-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
::v-deep .el-textarea.is-disabled .el-textarea__inner {
  color: #000;
}
::v-deep .el-input.is-disabled .el-input__inner {
  background-color: #fff;
  color: #000;
  cursor: not-allowed;
}
::v-deep .el-textarea.is-disabled .el-textarea__inner {
  background-color: #f5f7fa;
  border-color: #e4e7ed;
  color: #000;
  cursor: not-allowed;
}
::v-deep .el-checkbox__input.is-disabled + span.el-checkbox__label {
  color: #000;
}
::v-deep .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner:after {
  border-color: #000;
}
</style>
